Skip to content

fixed test err - #3

Merged
rithythul merged 4 commits into
mainfrom
task1
Nov 25, 2025
Merged

fixed test err#3
rithythul merged 4 commits into
mainfrom
task1

Conversation

@rithythul

Copy link
Copy Markdown
Member

No description provided.

- Add @jest/globals imports to setup.ts
- Create tsconfig.test.json for test files
- Update jest.config.js to use test tsconfig
- Fix mock file with @ts-nocheck for jest.fn() typing issues
- Update test files to use correct API signatures
- Update SDK tests to match actual behavior (getConnectionInfo returns object)
- Update balances tests to use bigint values

All 22 tests now pass.
CLI package has no tests yet, so jest needs this flag to exit with code 0.
Fixed imports in:
- balances/client.ts
- staking/client.ts
- staking/queries.ts

Required for Node.js ESM module resolution when using the compiled SDK.
The previous error handling used exitOverride() which caused Commander.js
to throw exceptions for help/version display. This resulted in 'Error: (outputHelp)'
being printed and exit code 1 when running --help.

Simplified to use standard promise-based error handling instead.
@rithythul
rithythul merged commit c675340 into main Nov 25, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant